function pcapa_app(){}
pcapa_app.prototype = {
	refresh_interval: 5,
	timer_id: 0,
	load: function(){	

	},
	refresh: function(){
		this.timer_id = 0;
		var data = {file:'inbound2.pcap'};
		wapp.com('pcapa','refresh', data, false, function(res){
			$('#pcapa_result').html(res.text);
			
			this.timer_id = setTimeout(function(){wapp.app('pcapa').refresh();},this.refresh_interval * 1000);
		}.bind(this), function(){
			$('#pcapa_result').html('Server not available.');
			
			this.timer_id = setTimeout(function(){wapp.app('pcapa').refresh();},this.refresh_interval * 1000);
		}.bind(this));		
	},
	unload: function(){
		clearTimeout(this.timer_id);
	}
};